how to derive the euler's equation of motion